import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import echarts from 'echarts'
import ZkTable from 'vue-table-with-tree-grid'
import {hasPermission} from './utils/permissionDirect'
import httpRequest from "./utils/httpRequest";

const Plugins = [hasPermission]

Plugins.map((plugin) => {
    Vue.use(plugin)
})

Vue.use(ZkTable)
Vue.use(echarts)

/*设置全局的请求$http*/
Vue.prototype.$http = httpRequest;
Vue.prototype.$echarts =echarts;

// main.js
Vue.prototype.$globalVar = {
    sizes: [10,20,30,50,100,200,500],
};

/**
 * 自定义权限指令
 */
Vue.config.productionTip = false
Vue.use(ElementUI,{size:"mini"})
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
